package com.qf.service.impl;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.qf.dao.UserDao;
import com.qf.pojo.User;
import com.qf.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author ShenZhuoPing
 * @version V1.0
 * @Project TestSSM
 * @Package com.qf.service.impl
 * @Description:
 * @Date 2022/7/16 15:43
 */
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserDao userDao;

    @Override
    public Object findPage(Integer pageNum, Integer pageSize) {

        PageHelper.startPage(pageNum,pageSize);
        Page<User> userPage = userDao.findAll();
        PageInfo pageInfo=new PageInfo(userPage);

        return pageInfo;
    }
}
